﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Threading;

namespace WcfNotifyService
{
    /// <summary>
    /// WCF Service for clients to communicate with server
    /// </summary>
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    public class NotifyService : INotifyService
    {
        /// <summary>
        /// Notify to all clients a new list of clients connected to its table
        /// </summary>
        /// <param name="list_seat">The List of Poepla already connected to table</param>
        /// <param name="table">The Table to update</param>
        public void GetData(List<Object> list_seat, Object table)
        {
            ICallback callback = OperationContext.Current.GetCallbackChannel<ICallback>();
            callback.Notify(list_seat, table);
        }
    }
}
